-
Notifications
You must be signed in to change notification settings - Fork 11
Improve performance of row ids #180
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
commit: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the reason to add base64-js
? Because we need to support both browsers and non-browser platforms like Node.Js ?
Yes, that is why I added it. |
Description of Changes
This makes a few performance improvements. It is pretty similar to #179. The key changes are:
This also has the fix of using
concat
instead ofpush(...
that was in #179.Since I was already making some changes in the TableCache, I added some more context to log messages, so hopefully any future bug reports will be easier to look into.
These changes also give us a way to make
find
efficient, but I didn't put it in this PR.Requires SpacetimeDB PRs
Requires this codegen change clockworklabs/SpacetimeDB#2671, so we need to wait for the next release.
I'm going to leave this as a draft until we release a version with the required codegen changes.
Once we get this codegen change released, which adds the CLI version to the generated typescript code. I can add an assertion in the client that the generated code came from a compatible version.
Testing
There are some existing tests in
db_connection.test.ts
that cover parsing update messages, and this PR addstable_cache.test.ts
, which has testing for applying row operations to the table cache (and the resulting callbacks).